<template>
	<view class="container">
		<leaveList :listInfo="editList"></leaveList>
	</view>
</template>

<script>
	import leaveList from '../template/leaveList.vue'
	import * as api from '../config/api.js'
	export default {
		data(){
			return{
				editList:[]
			}
		},
		components:{
			leaveList
		},
		onLoad(){
			// 发送请求获取数据
			let leaveUserNum = uni.getStorageSync('leaveUserNum')
			let that = this
			api.getHistoryApi(leaveUserNum,{
				data:{},
				success:res =>{
					// console.log("历史请求出的数据")
					console.log(res)
					if(res.code == 200){
						that.editList = res.data
					}else{
						uni.showToast({
							title:"数据加载失败",
							icon:"none"
						})
					}
				},
				fail:err=>{
					console.log(err)
				}
			})
		}
	}
</script>

<style>
	page{
		width: 100%;
		height: 100%;
	}
	.container{
		width: 100%;
		height: 100%;
		padding: 10upx 0 30upx 0;
		/* background-color: #0000FF; */
	}
</style>
